﻿<%@ Page Language="C#" MasterPageFile="~/manager/page/ManagerMasterPage.Master" AutoEventWireup="true" CodeBehind="article1_write.aspx.cs" ValidateRequest="false" Inherits="Com.Web.coffinegurunaru.manager.board.article1_write" %>
<%@ Register TagPrefix="UC" TagName="BoardMenu" Src="~/manager/board/boardmenu.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="phHead" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="phContent" runat="server">
<hr />
<br />
<table>
<tr>
	<td valign="top">
        <UC:BoardMenu id="boardMenu" runat="server" />
	</td>
	<td style="width:20px;"></td>
	<td valign="top">
        <table width="100%">
		<tr>
			<td style="text-align:center;" valign="top">
				<table  cellpadding="0" cellspacing="1" border="0" style="background-color:Olive">
				<tr>
					<td style="width:100px; background-color:#eeeeee; text-align:center">제목</td>
					<td style="width:300px; background-color:#ffffff; text-align:left"><input type="text" class="m_Title" style="width:500px" name="Title" value="<%=Title.HTMLEncode() %>"></td>
				</tr>
				<tr>
					<td style="width:100px; background-color:#eeeeee; text-align:center">내용</td>
					<td style="width:300px; background-color:#ffffff; text-align:left">
<script language="JavaScript" type="text/javascript">
<!--
var content = new HyperTextArea("Content", "<%=Content.Replace("\"", "\\\"").Replace("\r\n", "") %>", 790, 400, "", 5, "");
//-->
</script>
					</td>
				</tr>
				<tr>
					<td style="width:100px; background-color:#eeeeee; text-align:center">읽은수</td>
					<td style="width:300px; background-color:#ffffff; text-align:left"><input type="text" class="m_ReadCount" style="width:500px" name="ReadCount" value="<%=ReadCount %>"></td>
				</tr>
				<tr>
					<td style="background-color:#ffffff; text-align:center" colspan="2">
					<input type="button" class="m_btnCreate" value="저장" />&nbsp;&nbsp;&nbsp;
					<input type="button" class="m_btnList" value="취소" />
					</td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
	</td>
</tr>
</table>

<script language="javascript" type="text/javascript">
$(function() {
	$("input.m_btnList").click(function() {
		location.href="article1.aspx?&BoardSN=<%=BoardSN %>&PageNo=<%=PageNo %>";
	});
	
	$("input.m_btnCreate").click(function() {
		var Title = $("input.m_Title").val();
		
		if ( $.trim(Title) == "" ) {
			alert("제목을 입력하세요");
			return false;
		}
		content.update();
		if ( content.html == "" ) {
			alert("내용을 입력하세요");
			return false;
		}
		
		$("form:eq(0)").submit();
	});
});
</script>

</asp:Content>
